package cn.edu.scau.cmi.dengshixin.composite.consistent;

import cn.edu.scau.cmi.dengshixin.composite.Component;
import javafx.scene.control.TextArea;

public class ConsistentPerson extends Component {
	
	public ConsistentPerson(String name) {
		this.name = name;
		this.organization = null;
	}
	
	public ConsistentPerson(String name, String organization) {
		this.name = name;
		this.organization = organization;
	}
	
	public void doSomething(TextArea textArea) {
		textArea.appendText("\t" + this.name + "为[" + this.organization + "]部门做贡献！\n");
	}
	
	public boolean addChild(Component c) { 
		return super.addChild(c); 
	}
	
	public boolean removeChild(Component c) { 
		return super.removeChild(c); 
	}

}
